// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/gnmi_ext/gnmi_ext.proto

package gnmi_ext

/*
Package gnmi_ext defines a set of extensions messages which can be optionally
included with the request and response messages of gNMI RPCs. A set of
well-known extensions are defined within this file, along with a registry for
extensions defined outside of this package.
*/

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// RegisteredExtension is an enumeration acting as a registry for extensions
// defined by external sources.
type ExtensionID int32

const (
	ExtensionID_EID_UNSET ExtensionID = 0
	// An experimental extension that may be used during prototyping of a new
	// extension.
	ExtensionID_EID_EXPERIMENTAL ExtensionID = 999
)

var ExtensionID_name = map[int32]string{
	0:   "EID_UNSET",
	999: "EID_EXPERIMENTAL",
}
var ExtensionID_value = map[string]int32{
	"EID_UNSET":        0,
	"EID_EXPERIMENTAL": 999,
}

func (x ExtensionID) String() string {
	return proto.EnumName(ExtensionID_name, int32(x))
}
func (ExtensionID) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_gnmi_ext_dbd63b261a5523ca, []int{0}
}

// The Extension message contains a single gNMI extension.
type Extension struct {
	// Types that are valid to be assigned to Ext:
	//	*Extension_RegisteredExt
	Ext                  isExtension_Ext `protobuf_oneof:"ext"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (m *Extension) Reset()         { *m = Extension{} }
func (m *Extension) String() string { return proto.CompactTextString(m) }
func (*Extension) ProtoMessage()    {}
func (*Extension) Descriptor() ([]byte, []int) {
	return fileDescriptor_gnmi_ext_dbd63b261a5523ca, []int{0}
}
func (m *Extension) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Extension.Unmarshal(m, b)
}
func (m *Extension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Extension.Marshal(b, m, deterministic)
}
func (dst *Extension) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Extension.Merge(dst, src)
}
func (m *Extension) XXX_Size() int {
	return xxx_messageInfo_Extension.Size(m)
}
func (m *Extension) XXX_DiscardUnknown() {
	xxx_messageInfo_Extension.DiscardUnknown(m)
}

var xxx_messageInfo_Extension proto.InternalMessageInfo

type isExtension_Ext interface {
	isExtension_Ext()
}

type Extension_RegisteredExt struct {
	RegisteredExt *RegisteredExtension `protobuf:"bytes,1,opt,name=registered_ext,json=registeredExt,oneof"`
}

func (*Extension_RegisteredExt) isExtension_Ext() {}

func (m *Extension) GetExt() isExtension_Ext {
	if m != nil {
		return m.Ext
	}
	return nil
}

func (m *Extension) GetRegisteredExt() *RegisteredExtension {
	if x, ok := m.GetExt().(*Extension_RegisteredExt); ok {
		return x.RegisteredExt
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*Extension) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Extension_OneofMarshaler, _Extension_OneofUnmarshaler, _Extension_OneofSizer, []interface{}{
		(*Extension_RegisteredExt)(nil),
	}
}

func _Extension_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Extension)
	// ext
	switch x := m.Ext.(type) {
	case *Extension_RegisteredExt:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.RegisteredExt); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("Extension.Ext has unexpected type %T", x)
	}
	return nil
}

func _Extension_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Extension)
	switch tag {
	case 1: // ext.registered_ext
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(RegisteredExtension)
		err := b.DecodeMessage(msg)
		m.Ext = &Extension_RegisteredExt{msg}
		return true, err
	default:
		return false, nil
	}
}

func _Extension_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Extension)
	// ext
	switch x := m.Ext.(type) {
	case *Extension_RegisteredExt:
		s := proto.Size(x.RegisteredExt)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// The RegisteredExtension message defines an extension which is defined outside
// of this file.
type RegisteredExtension struct {
	Id                   ExtensionID `protobuf:"varint,1,opt,name=id,enum=gnmi_ext.ExtensionID" json:"id,omitempty"`
	Msg                  []byte      `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *RegisteredExtension) Reset()         { *m = RegisteredExtension{} }
func (m *RegisteredExtension) String() string { return proto.CompactTextString(m) }
func (*RegisteredExtension) ProtoMessage()    {}
func (*RegisteredExtension) Descriptor() ([]byte, []int) {
	return fileDescriptor_gnmi_ext_dbd63b261a5523ca, []int{1}
}
func (m *RegisteredExtension) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_RegisteredExtension.Unmarshal(m, b)
}
func (m *RegisteredExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_RegisteredExtension.Marshal(b, m, deterministic)
}
func (dst *RegisteredExtension) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RegisteredExtension.Merge(dst, src)
}
func (m *RegisteredExtension) XXX_Size() int {
	return xxx_messageInfo_RegisteredExtension.Size(m)
}
func (m *RegisteredExtension) XXX_DiscardUnknown() {
	xxx_messageInfo_RegisteredExtension.DiscardUnknown(m)
}

var xxx_messageInfo_RegisteredExtension proto.InternalMessageInfo

func (m *RegisteredExtension) GetId() ExtensionID {
	if m != nil {
		return m.Id
	}
	return ExtensionID_EID_UNSET
}

func (m *RegisteredExtension) GetMsg() []byte {
	if m != nil {
		return m.Msg
	}
	return nil
}

func init() {
	proto.RegisterType((*Extension)(nil), "gnmi_ext.Extension")
	proto.RegisterType((*RegisteredExtension)(nil), "gnmi_ext.RegisteredExtension")
	proto.RegisterEnum("gnmi_ext.ExtensionID", ExtensionID_name, ExtensionID_value)
}

func init() {
	proto.RegisterFile("proto/gnmi_ext/gnmi_ext.proto", fileDescriptor_gnmi_ext_dbd63b261a5523ca)
}

var fileDescriptor_gnmi_ext_dbd63b261a5523ca = []byte{
	// 196 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x28, 0xca, 0x2f,
	0xc9, 0xd7, 0x4f, 0xcf, 0xcb, 0xcd, 0x8c, 0x4f, 0xad, 0x28, 0x81, 0x33, 0xf4, 0xc0, 0xe2, 0x42,
	0x1c, 0x30, 0xbe, 0x52, 0x14, 0x17, 0xa7, 0x6b, 0x45, 0x49, 0x6a, 0x5e, 0x71, 0x66, 0x7e, 0x9e,
	0x90, 0x1b, 0x17, 0x5f, 0x51, 0x6a, 0x7a, 0x66, 0x71, 0x49, 0x6a, 0x51, 0x6a, 0x0a, 0x48, 0x5a,
	0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x56, 0x0f, 0xae, 0x3f, 0x08, 0x2e, 0x0f, 0xd7, 0xe6,
	0xc1, 0x10, 0xc4, 0x5b, 0x84, 0x2c, 0xec, 0xc4, 0xca, 0xc5, 0x0c, 0x32, 0xdb, 0x8f, 0x4b, 0x18,
	0x8b, 0x72, 0x21, 0x55, 0x2e, 0xa6, 0xcc, 0x14, 0xb0, 0xc9, 0x7c, 0x46, 0xa2, 0x08, 0x93, 0xe1,
	0x0a, 0x3c, 0x5d, 0x82, 0x98, 0x32, 0x53, 0x84, 0x04, 0xb8, 0x98, 0x73, 0x8b, 0xd3, 0x25, 0x98,
	0x14, 0x18, 0x35, 0x78, 0x82, 0x40, 0x4c, 0x2d, 0x63, 0x2e, 0x6e, 0x24, 0x45, 0x42, 0xbc, 0x5c,
	0x9c, 0xae, 0x9e, 0x2e, 0xf1, 0xa1, 0x7e, 0xc1, 0xae, 0x21, 0x02, 0x0c, 0x42, 0xa2, 0x5c, 0x02,
	0x20, 0xae, 0x6b, 0x44, 0x80, 0x6b, 0x90, 0xa7, 0xaf, 0xab, 0x5f, 0x88, 0xa3, 0x8f, 0xc0, 0x73,
	0xf6, 0x24, 0x36, 0xb0, 0x8f, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0xa3, 0xaf, 0x4d,
	0x12, 0x01, 0x00, 0x00,
}
